<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<c:set var="contextPath" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/static/docs/style/css/index.css" />
<script type="text/javascript">
	// 下单
	function genernateOrder() {
		window.location.href = "${pageContext.request.contextPath}/clientOrderList";
	}
</script>
<script type="text/javascript">
	var	add=doument.getElementById("add");
	var	sub=document.getElementById("sub");
	var	foodcount=document.getElementById("foodcount");
	
	add.onclick=function(){
		foodcount.value=parseInt(foodcount.value)+1;
		
	}
	
	sub.onclick=function(){
		if(foodcount.value<=0){
			foodcount.value=0;
		}else{
			foodcount.value=parseInt(foodcount.value)-1;
		}
	}
	
</script>
</head>

<body style="text-align: center">
	<div id="all">
		<div id="menu">
			<!-- 餐车div -->
			<div id="count">
				<table align="center" width="100%">
					<tr height="40">
						<td align="center" width="20%">菜名</td>
						<td align="center" width="20%">单价</td>
						<td align="center" width="20%">数量</td>
						<td align="center" width="20%">操作</td>
					</tr>
					<form action="${food.id}" method="post" modelAttribute="food">
						<tr height="60">
							<td align="center" width="20%">${food.foodname}</td>
							<td align="center" width="20%">￥${food.price}</td>

							<td align="center" width="20%"><a id="sub"
								href="javascript:void(0);">-</a> <input type="text"
								id="foodcount" name="foodcount" value="1" /> <a id="add"
								href="javascript:void(0);">+</a></td>


							<td align="center" width="20%"><input type="button"
								value="删除" class="btn_next" lang="3"
								onclick="removeSorder(this)" /></td>
						</tr>
						<tr>
							<td colspan="6" style="margin-left: 100px; text-align: center;"
								align="right"><input type="hidden" name="bId" value="">
								<input type="submit" value="下单" class="btn_next"
								onclick="genernateOrder()" /></td>
						</tr>
					</form>
				</table>






			</div>
		</div>

		<!-- 右边菜系列表，菜品搜索框  -->
		<div id="dish_class">
			<div id="dish_top">
				<ul>
					<li class="dish_num"></li>
					<li><a
						href="${pageContext.request.contextPath}/xiadan/${orders.id}">
							<img
							src="${pageContext.request.contextPath}/static/docs/style/images/call2.gif" />
					</a></li>
				</ul>
			</div>

			<div id="dish_2">
				<ul>

					<c:forEach items="${foodTypeList1}" var="foodType">
						<li><a
							href="${pageContext.request.contextPath}/caidan/${foodType.id}">${foodType.typename}</a>

						</li>
					</c:forEach>

				</ul>
			</div>

		</div>
	</div>
</body>
</html>